<div class="container" style="margin-top: 40px;">
    <ul class="nav nav-tabs midbox" id="myTab">
        <?php $this->component('Hr_StaffMenu','add');?>
    </ul>
    <form id="form-horizontal" class="form-horizontal midbox" action="" method="post">

        <?php /*基本信息 BEGIN*/ ?>
        <div class="control-group">
           <label class="control-label lbl_title" style="width:70px">员工信息</label>
        </div>
        <input type="hidden"  name="user_id" value="<?php echo $user['user_id'];?>"/>
        <!--表单验证上面已验证 begin-->
        <div class="control-group">
            <label class="control-label"><em class="star">* </em>姓名：</label>
            <div class="controls">
                <input type="text" placeholder="" class="byteRangeLength" name="username" value="<?php echo $user['real_name'];?>"/>
                <?php if(isset($error['username'])){?><label for="username" generated="true" class="error"><?php echo $error['username'];?></label><?php }?>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label"><em class="star">* </em>性别：</label>
            <div class="controls">
                <label class="radio inline">
                    <input type="radio" name="sex" value="1" <?php if($user['sex'] == 1) {?>checked<?php }?> class="" /> 男
                </label>
                <label class="radio inline">
                    <input type="radio" name="sex" value="2" <?php if($user['sex'] == 2) {?>checked<?php }?>/> 女
                </label>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label"><em class="star">* </em>唯一性标识：</label>
            <div class="controls">
                <label class="radio inline">
                    <input type="radio" value="1" id="idcard_l" name="unique_type" <?php if($user['identity_type'] == 1) {?>checked<?php }?> /> 身份证
                </label>
                <label class="radio inline">
                    <input type="radio" value="2" id="passport_l" name="unique_type" <?php if($user['identity_type'] == 2) {?>checked<?php }?>/> 护照号码
                </label>
            </div>
            <input type="text" name="isIdCardNo" class="isIdCardNo,passport" style="margin-left: 20px;" value="<?php echo $user['identity_code'];?>"/>
            <?php if(isset($error['isIdCardNo'])){?><label for="isIdCardNo" generated="true" class="error"><?php echo $error['isIdCardNo'];?></label><?php }?>
        </div>
        <div class="control-group">
            <label class="control-label"><em class="star">* </em>出生日期：</label>
            <div class="controls">
                <div class="input-append" style="vertical-align: inherit;">
                    <input name="birthday" id="birthday" value="<?php if($user['birthday']){echo $user['birthday'];}?>" class="{required:true,messages:{required:'出生日期不能为空'}} span2" type="text" style="vertical-align: top;" />
                    <span class="add-on"><i class="icon-calendar"></i></span>
                    <?php if(isset($error['birthday'])){?><label for="birthday" generated="true" class="error"><?php echo $error['birthday'];?></label><?php }?>
                </div>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">籍贯：</label>
            <div class="controls">
                <input type="text" class="byteRangeLength" placeholder="" name="native_place" value="<?php echo $user['native_place'];?>"/>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">身份证地址：</label>
            <div class="controls">
                <input type="text" class="byteRangeLength" placeholder="" name="cordAdd" value="<?php echo $user['identity_address'];?>"/>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">现居地址：</label>
            <div class="controls">
                <input type="text" class="byteRangeLength" placeholder="" name="xianju" value="<?php echo $user['present_address'];?>"/>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">最高学历：</label>
            <div class="controls">
                <label class="radio inline">
                    <input type="radio" value="5" name="degree" <?php if($user['degree'] == 5) {?>checked<?php }?> /> 博士
                </label>
                <label class="radio inline">
                    <input type="radio" value="4" name="degree" <?php if($user['degree'] == 4) {?>checked<?php }?> /> 硕士
                </label>
                <label class="radio inline">
                    <input type="radio" value="3" name="degree" <?php if($user['degree'] == 3) {?>checked<?php }?> /> 本科
                </label>
                <label class="radio inline">
                    <input type="radio" value="2" name="degree" <?php if($user['degree'] == 2) {?>checked<?php }?> /> 专科
                </label>
                <label class="radio inline">
                    <input type="radio" value="1" name="degree" <?php if($user['degree'] == 1) {?>checked<?php }?> /> 高中及以下
                </label>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">毕业时间：</label>
            <div class="controls">
                <div class="input-append" style="vertical-align: inherit;">
                    <input class="span2" name="graduate_time" id="datepicker1" type="text" style="vertical-align: top;" value="<?php echo $user['graduate_time'];?>"/>
                    <span class="add-on"><i class="icon-calendar"></i></span>
                </div>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">毕业院校：</label>
            <div class="controls">
                <input type="text" class="byteRangeLength" placeholder="" name="bisch" value="<?php echo $user['graduate_university'];?>"/>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">专业名称：</label>
            <div class="controls">
                <input type="text" class="byteRangeLength" placeholder="" name="zhuanye" value="<?php echo $user['profession'];?>"/>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">婚姻状况：</label>
            <div class="controls">
                <label class="radio inline">
                    <input type="radio" value="1" name="marital_status" <?php if($user['marital_status'] == 1) {?>checked<?php }?>/> 未婚
                </label>
                <label class="radio inline">
                    <input type="radio" value="2" name="marital_status" <?php if($user['marital_status'] == 2) {?>checked<?php }?>/> 已婚
                </label>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">生育状况：</label>
            <div class="controls">
                <label class="radio inline">
                    <input type="radio" value="1" name="fertility_status" <?php if($user['fertility_status'] == 1) {?>checked<?php }?>/> 未育
                </label>
                <label class="radio inline">
                    <input type="radio" value="2" name="fertility_status" <?php if($user['fertility_status'] == 2) {?>checked<?php }?>/> 已育
                </label>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">英文名：</label>
            <div class="controls">
                <input type="text" class="byteRangeLength" placeholder="" name="englishname" value="<?php echo $user['english_name'];?>"/>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">改名：</label>
            <div class="controls">
                <input type="text" class="updateName" placeholder="" name="updateName" value="<?php echo $user['user_name'];?>"/>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">公司电话：</label>
            <div class="controls">
                <div class="input-append" style="vertical-align: inherit;">
                    <input class="{maxlength:20,messages:{maxlength:'最多只能输入20个字符'}} span2"  type="text" style="vertical-align: top;" name="tel1" maxlength="20" value="<?php echo $user['office_phone'];?>"/>
                    <label style="display: inline-block;">&nbsp;&nbsp;&nbsp;&nbsp;&ndash;</label>
                    <input style="vertical-align: top;margin-left: 20px" class="{number:true,messages:{number:'最多只能输入20个数字'}} span1" name="tel2" maxlength="20"  type="text" value="<?php echo $user['office_phone_ex'];?>"/>
                </div>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">银行名称：</label>
            <div class="controls">
                <input type="text" class="byteRangeLength" placeholder="" name="bank" value="<?php echo $user['bank_name'];?>"/>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">卡号：</label>
            <div class="controls">
                <input type="text" name="bank_card" class="{number:true,maxlength:30,messages:{maxlength:'限制制30位数字',number:'请输入数字'}}" placeholder="" value="<?php echo $user['bank_card'];?>">
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">手机：</label>
            <div class="controls">
                <input type="text" name="phone" class="isMobile" value="<?php echo $user['cellphone'];?>"/>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">公司邮箱：</label>
            <div class="controls">
                <input type="text" name="email" class="{email:true,isUnicueEmail:true,maxlength:30,messages:{email:'请输入合法邮箱'}}" placeholder="" value="<?php echo $user['office_mail'];?>"/>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">紧急联系人：</label>
            <div class="controls">
                <input type="text" name="emergency_people" class="{maxlength:10,messages:{maxlength:'请输入10位中文字符'}}" placeholder="" value="<?php echo $user['emergency_people'];?>"/>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">紧急联系电话：</label>
            <div class="controls">
                <input type="text" name="isPhone" class="isPhone" placeholder="" value="<?php echo $user['emergency_phone'];?>"/>
            </div>
        </div>
        <!--表单验证上面已验证 end-->
        <?php /*基本信息 END*/ ?>


        <?php /*合同信息 BEGIN*/ ?>
        <div class="control-group">
           <label class="control-label lbl_title" style="width:70px">合同信息</label>
        </div>
        <div class="control-group">
            <label class="control-label"><em class="star">* </em>合同签约公司：</label>
            <div class="controls">
                <select class="{required:true,min:0,messages:{required:'',min:''}} <?php if(isset($error['pack'])) {echo 'error';}?>" name="pack">
                    <option>请选择</option>
                    <?php foreach($agree_company as $company){?>
                        <option value="<?php echo $company['company_id'];?>" <?php if($company['company_id'] == $user['company_id']){?>selected="selected"<?php }?>><?php echo $company['company_name'];?></option>
                    <?php }?>
                </select>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label"><em class="star">* </em>合同签约城市：</label>
            <div class="controls">
                <select class="{required:true,min:0,messages:{required:'',min:''}} <?php if(isset($error['packcity'])) {echo 'error';}?>" name="packcity">
                    <option>请选择</option>
                    <?php foreach($agree_city as $city){?>
                        <option value="<?php echo $city['city_id'];?>" <?php if($city['city_id'] == $user['city_id']){?>selected="selected"<?php }?>><?php echo $city['city_name'];?></option>
                    <?php }?>
                </select>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label"><em class="star">* </em>员工类型：</label>
            <div class="controls">
                <select class="{required:true,min:0,messages:{required:'',min:''}} <?php if(isset($error['user_type'])) {echo 'error';}?>" name="user_type">
                    <option>请选择</option>
                    <?php foreach($user_type as $type){?>
                        <option value="<?php echo $type['type_id'];?>" <?php if($type['type_id'] == $user['user_type']){?>selected="selected"<?php }?>><?php echo $type['type_name'];?></option>
                    <?php }?>
                </select>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">工号：</label>
            <div class="controls">
                <label class="user_code"><?php echo $user['user_code'];?></label>
                <input type="hidden" name="user_code" value="<?php echo $user['user_code'];?>">
            </div>
        </div>
        <div class="control-group">
        <label class="control-label"><em class="star">* </em>入职日期：</label>
        <div class="controls">
            <div class="input-append" style="vertical-align: inherit;">
                <input name="enter_date" value="<?php if($user['enter_date']){echo $user['enter_date'];}?>" id="datepicker8" class="{required:true,messages:{required:'入职日期不能为空'}} span2" type="text" style="vertical-align: top;" />
                <span class="add-on"><i class="icon-calendar"></i></span>
            </div>
        </div>
        </div>
        <div class="control-group">
            <label class="control-label">试用期：</label>
            <div class="controls">
                <div class="input-append" style="vertical-align: inherit;">
                    <input name="trial_start" class="span2" id="datepicker4" type="text" style="vertical-align: top;" value="<?php echo $user['trial_start'];?>"><span class="add-on"><i class="icon-calendar"></i></span>
                    <label style="display: inline-block;">&nbsp;&nbsp;&ndash;&nbsp;&nbsp;</label>
                    <input name="trial_end"  style="vertical-align: top;" class="span2" id="datepicker5" type="text" value="<?php echo $user['trial_end'];?>"><span class="add-on"><i class="icon-calendar"></i></span>
                    <label class="inline" style="display:inline-block;"><input  name="trial_keep"  type="text" class="span1" style="margin-left:8px" value="<?php echo $user['trial_keep'];?>">
                       月</label>
                       <?php if(isset($error['trial_start_end'])){?><label for="datepicker4" generated="true" class="error"><?php echo $error['trial_start_end'];?></label><?php }?>
                </div>
            </div>
        </div>
        <div class="control-group">
        <label class="control-label">转正日期：</label>
        <div class="controls">
            <div class="input-append" style="vertical-align: inherit;">
                <input name="indue_date" value="<?php if($user['indue_date']){echo $user['indue_date'];}?>" id="datepicker8" type="text" class="span2" style="vertical-align: top;" />
                <span class="add-on"><i class="icon-calendar"></i></span>
            </div>
        </div>
        </div>
        <div class="control-group">
            <label class="control-label"><em class="star">* </em>合同期限：</label>
            <div class="controls">
                <div class="input-append" style="vertical-align: inherit;">
                    <input name="join_start" class="{required:true,messages:{required:'合同开始时间不能为空 '}} span2" id="datepicker2" type="text" style="vertical-align: top;" value="<?php echo $user['join_start'];?>"><span class="add-on"><i class="icon-calendar"></i></span>
                    <label style="display: inline-block;">&nbsp;&nbsp;&ndash;&nbsp;&nbsp;</label>
                    <input name="join_end" style="vertical-align: top;" class="{required:true,messages:{required:'合同结束时间不能为空 '}} span2" id="datepicker3" type="text" value="<?php echo $user['join_end'];?>"><span class="add-on"><i class="icon-calendar"></i></span>
                    <label class="inline" style="display:inline-block;"><input type="text" name="join_keep" class="{required:true,messages:{required:'合同期限不能为空 '}} span1"  style="margin-left:8px" value="<?php echo $user['join_keep'];?>" />
                        年</label>
                    <?php if(isset($error['join_start_end'])){?><label for="datepicker2" generated="true" class="error"><?php echo $error['join_start_end'];?></label><?php }?>
                </div>
            </div>
        </div>

        <div class="control-group">
            <label class="control-label">合同次数：</label>
            <div class="controls">
                <input type="text" name="join_num" value="<?php echo $user['join_num'];?>" class="span1">
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">服务年限：</label>
            <div class="controls">
                <?php echo $user['work_time'];?>
            </div>
        </div>
        <?php /*合同信息 END*/ ?>


        <?php /*任职信息 BEGIN*/ ?>
        <div class="control-group">
           <label class="control-label lbl_title" style="width:70px">任职信息</label>
           <input type="hidden" name="work_id" value="<?php if($work){echo $work['work_id'];}?>"/>
        </div>
        <div class="control-group">
            <label class="control-label"><em class="star">* </em>职位名称：</label>
            <div class="controls">
                <input type="hidden" name="positionNameID" value="<?php if($work){echo $work['job_id'];}?>"/>
                <input type="text" name="positionName" class="byteRangeLength" placeholder="" value="<?php if($work){echo $work['job_name'];}?>" <?php if($user['user_id']){echo 'disabled="true"';}?>/>
                <?php if($user['user_id']){?>
                <input type="hidden" value="<?php echo $work['job_name'];?>" name="positionName_hidden">
                <?php }?>
                <?php if(isset($error['positionNameID'])){?>
                <label for="positionName" generated="true" class="error"><?=$error['positionNameID']?></label>
                <?php }?>
                <?php if($work){?><a href="<?php echo $staff_transfer_url;?>" target="_blank">转岗</a><?php }?>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">下级人数：</label>
            <div class="controls">
                <?php if($user['lower_num']){?>
                <a target="_blank" href="<?php echo $lower_people_url;?>"><?php echo $user['lower_num'];?></a>
                <?php }else{?>
                <?php echo $user['lower_num'];?>
                <?php }?>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">职称等级：</label>
            <div class="controls">
                <label class="select">
                    <select name="p_level" >
                    <option>请选择</option>
                    <?php foreach($p_degree as $degree){?>
                        <option value="<?php echo $degree['id'];?>" <?php if($degree['id'] == $user['p_level']){?>selected="selected"<?php }?>><?php echo $degree['degree'];?></option>
                    <?php }?>
                    </select>
                </label>
                 <label class="select">
                    <select name="m_level">
                    <option>请选择</option>
                    <?php foreach($m_degree as $degree){?>
                        <option value="<?php echo $degree['id'];?>" <?php if($degree['id'] == $user['m_level']){?>selected="selected"<?php }?>><?php echo $degree['degree'];?></option>
                    <?php }?>
                    </select>
                </label>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label"><em class="star">* </em>工作城市：</label>
            <div class="controls">
                <input id="work_city_name" class="span1" readonly name="work_city_name" value="<?php echo $user['work_city_name'];?>" type="text">
                <input id="work_city_id"  name="workCity" value="<?php echo $user['work_city_id'];?>" type="hidden">
            </div>
        </div>
        <div class="control-group">
            <label class="control-label"><em class="star">* </em>开始担任本职日期：</label>
            <div class="controls">
                <div class="input-append" style="vertical-align: inherit;">
                    <input class="span2" name="startWorkTime" id="datepicker6" type="text" style="vertical-align: top;" value="<?php if($work){echo $work['work_time'];}?>" />
                    <span class="add-on"><i class="icon-calendar"></i></span>
                    <?php if(isset($error['startWorkTime'])){?><label for="datepicker6" generated="true" class="error"><?php echo $error['startWorkTime'];?></label><?php }?>
                </div>
            </div>
        </div>
        <!-- mike 特殊处理 -->
        <div class="control-group" <?php if($user['user_code'] == 'SHA001'){echo 'style="display:none;"';}?>>
            <label class="control-label"><em class="star">* </em>直属上级：</label>
            <div class="controls">
                <input type="hidden" name="rzzxRelationId" value="<?php echo $work_derector_direct_yes['relation_id'];?>"/>
                <input type="hidden" name="directlyLeaderID" value="<?php if($work_derector_direct_yes) {echo $work_derector_direct_yes['parent_id'];}?>"/>
                <input type="hidden" name="directlyLeaderJobID" value="<?php if($work_derector_direct_yes) {echo $work_derector_direct_yes['parent_job_id'];}?>"/>
                <input type="text" name="directlyLeader" class="directlyLeader  byteRangeLength  ui-autocomplete-input" placeholder="" value="<?php if($work_derector_direct_yes) {echo $work_derector_direct_yes['parent_name'],' - ',$work_derector_direct_yes['parent_job_name'];}?>" />
                <?php if(isset($error['directlyLeaderID'])){?><label for="directlyLeader" generated="true" class="error"><?php echo $error['directlyLeaderID'];?></label><?php }?>
            </div>
        </div>
        <?php if($work_derector_direct_no){ $num = count($work_derector_direct_no);?>
            <?php foreach($work_derector_direct_no as $index => $derector){?>
            <div class="control-group">
            <label class="control-label">虚线主管：</label>
            <div class="controls">
                <input type="hidden" name="rzxxRelationId[]" value="<?php echo $derector['relation_id'];?>"/>
                <input type="hidden" name="nodirectlyLeaderID[]" value="<?php echo $derector['parent_id'];?>"/>
                <input type="hidden" name="nodirectlyLeaderJobID[]" value="<?php echo $derector['parent_job_id'];?>"/>
                <input type="text" name="noinDirectLeader[]" class="byteRangeLength" placeholder="" value="<?php echo $derector['parent_name'],' - ',$derector['parent_job_name'];?>" />
                <?php if(!$num || ($num == $index+1)){?>
                <a class="addIndirectLeader" href="javascript:void(0)">+添加虚线主管</a>
                <?php }else{?>
                <a href="javascript:void(0)" class="delIndirectLeader">--删除虚线主管</a>
                <?php }?>
            </div>
            </div>
            <?php }}else{?>
            <div class="control-group" <?php if($user['user_code'] == 'SHA001'){echo 'style="display:none;"';}?>>
            <label class="control-label">虚线主管：</label>
            <div class="controls">
                <input type="hidden" name="rzxxRelationId[]" />
                <input type="hidden" name="nodirectlyLeaderID[]"/>
                <input type="hidden" name="nodirectlyLeaderJobID[]"/>
                <input type="text" name="noinDirectLeader[]" class="byteRangeLength" placeholder=""/>
                <a class="addIndirectLeader" href="javascript:void(0)">+添加虚线主管</a>
            </div>
            </div>
        <?php }?>
        <?php /*任职信息 END*/ ?>


        <?php /*兼职信息 BEGIN*/ ?>
        <input type="hidden" name="" id="depart_max_num" value="<?php echo $depart_max_num;?>"/>
        <div title="兼职信息">
        <div class="control-group">
            <label class="control-label lbl_title" style="width:70px">兼职信息</label>
        </div>
        <?php if(empty($part_time)){?>
        <div class="panel_normal panel_hover"> <?php /* panel_hover 添加此class */?>
            <div class="control-group">
                <label class="control-label">职位名称：</label>
                <div class="controls">
                    <input type="hidden" name="ptPositionNameID[]" value=""/>
                    <input type="text" name="ptPositionName[]" class="byteRangeLength" placeholder="">
                </div>
            </div>
            <div class="control-group">
                <label class="control-label">开始担任本职日期：</label>
                <div class="controls">
                    <div class="input-append" style="vertical-align: inherit;">
                        <input type="hidden" name="jzwork_id[]" value="0"/>
                        <input class="span2" name="jzstarttime[]" id="datepicker7" type="text" style="vertical-align: top;">
                        <span class="add-on"><i class="icon-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="control-group">
                <label class="control-label">直属上级：</label>
                <div class="controls">
                    <input type="hidden" name="zxRelationId[]" />
                    <input type="hidden" name="dpDirectlyLeaderID[]"/>
                    <input type="hidden" name="dpDirectlyLeaderJobID[]"/>
                    <input type="text" name="dpDirectlyLeader[]" class="byteRangeLength" placeholder="">
                </div>
            </div>
            <div class="control-group">
                <label class="control-label">虚线主管：</label>
                <div class="controls">
                    <input type="hidden" name="xxRelationId[0][]" />
                    <input type="hidden" name="dpInDirectlyLeaderID[0][]"/>
                    <input type="hidden" name="dpInDirectlyLeaderJobID[0][]"/>
                    <input type="text" name="dpInDirectlyLeader[0][]" class="byteRangeLength" placeholder=""><a class="addIndirectLeader" href="javascript:void(0)">+添加虚线主管</a>
                </div>
            </div>
            <a class="a_del" href="javascript:;" style="top:30px;" id="delDpartPosition">删除兼职信息</a>
            <a class="a_del" href="javascript:;"   id="addDpartPosition">添加兼职信息</a>
        </div>
        <?php }else{?>
        <?php foreach($part_time as $i=> $part){?>
        <div class="panel_normal panel_hover" <?php if($i>0) {echo 'style="margin-top:30px;"';}?>> <?php/* panel_hover 添加此class */?>
        <div class="control-group">
            <label class="control-label">职位名称：</label>
            <div class="controls">
                <input type="hidden" name="ptPositionNameID[]" value="<?php echo $part['job_id'];?>"/>
                <input type="text" name="ptPositionName[]" class="byteRangeLength" placeholder="" value="<?php echo $part['job_name'];?>">
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">开始担任本职日期：</label>
            <div class="controls">
                <div class="input-append" style="vertical-align: inherit;">
                    <input type="hidden" name="jzwork_id[]" value="<?php echo $part['work_id'];?>"/>
                    <input class="span2" name="jzstarttime[]" id="datepicker7" type="text" style="vertical-align: top;" value="<?php echo $part['work_time'];?>">
                    <span class="add-on"><i class="icon-calendar"></i></span>
                </div>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">直属上级：</label>
            <div class="controls">
                <input type="hidden" name="zxRelationId[]" value="<?php echo $part['derector_direct_yes']['relation_id'];?>"/>
                <input type="hidden" name="dpDirectlyLeaderID[]" value="<?php if($part['derector_direct_yes']){echo $part['derector_direct_yes']['parent_id'];}?>"/>
                <input type="hidden" name="dpDirectlyLeaderJobID[]" value="<?php if($part['derector_direct_yes']){echo $part['derector_direct_yes']['parent_job_id'];}?>"/>
                <input type="text" name="dpDirectlyLeader[]" class="byteRangeLength" placeholder="" value="<?php if($part['derector_direct_yes']){echo $part['derector_direct_yes']['parent_name'],' - ',$part['derector_direct_yes']['parent_job_name'];}?>">
            </div>
        </div>
        <?php if($part['derector_direct_no']){ $num = count($part['derector_direct_no']);?>
            <?php foreach($part['derector_direct_no'] as $index=> $derector){?>
            <div class="control-group">
            <label class="control-label">虚线主管：</label>
            <div class="controls">
                <input type="hidden" name="xxRelationId[<?php echo $part['work_id'];?>][]" value="<?php echo $derector['relation_id'];?>" />
                <input type="hidden" name="dpInDirectlyLeaderID[<?php echo $part['work_id'];?>][]" value="<?php echo $derector['parent_id'];?>"/>
                <input type="hidden" name="dpInDirectlyLeaderJobID[<?php echo $part['work_id'];?>][]" value="<?php echo $derector['parent_job_id'];?>"/>
                <input type="text" name="dpInDirectlyLeader[<?php echo $part['work_id'];?>][]" class="byteRangeLength" placeholder="" value="<?php echo $derector['parent_name'],' - ',$derector['parent_job_name'];?>">
                <?php if(($index+1) == $num){?>
                <a class="addIndirectLeader" href="javascript:void(0)">+添加虚线主管</a>
                <?php }?>
            </div>
            </div>
            <?php }?>
            <?php }else{?>
            <div class="control-group">
            <label class="control-label">虚线主管：</label>
            <div class="controls">
                <input type="hidden" name="xxRelationId[<?php echo $part['work_id'];?>][]" />
                <input type="hidden" name="dpInDirectlyLeaderID[<?php echo $part['work_id'];?>][]"/>
                <input type="hidden" name="dpInDirectlyLeaderJobID[<?php echo $part['work_id'];?>][]"/>
                <input type="text" name="dpInDirectlyLeader[<?php echo $part['work_id'];?>][]" class="byteRangeLength" placeholder=""><a class="addIndirectLeader" href="javascript:void(0)">+添加虚线主管</a>
            </div>
            </div>
        <?php }?>
        </div>
        <?php }}?>
        </div>
        <?php /*兼职信息 END*/ ?>


        <?php /*培训信息 BEGIN*/ ?>
        <div class="control-group">
           <label class="control-label lbl_title" style="width:70px">培训信息</label>
        </div>
         <div class="control-group">
            <label class="control-label">新员工培训：</label>
            <div class="controls">
                <label class="radio inline">
                    <input type="radio" name="isTrain" value="1" <?php if($user['new_train'] == 1){?>checked<?php }?>/> 未参加
                </label>
                <label class="radio inline">
                    <input type="radio" name="isTrain" value="2" <?php if($user['new_train'] == 2){?>checked<?php }?>/> 已参加
                </label>
            </div>
        </div>
        <div class="control-group">
            <div class="controls">
                <label class="radio inline">
                    <button type="submit" class="btn btn-primary">保存</button>
                </label>
                <label class="radio inline">
                    <a type="button" class="btn" href="">取消</a>
                </label>
            </div>
        </div>
        <?php /*培训信息 END*/ ?>
</form>
</div>
    <!--confrim框begain 可以只存在编辑页,在添加页亦不影响-->
<div id="confirmDialog" class="modal hide dialog in" style="width: 350px;; " aria-hidden="false">
<div class="modal-header">
    <a class="close" data-dismiss="modal">×</a>
    <h5 style="color: #555;">提示信息</h5>
</div>
<div class="modal-body" style="text-align: center; padding: 15px; 0 ; font-size: 14px;">
    您确定删吗？
</div>
<div class="modal-footer" style="padding: 8px 0; text-align: center;">
    <a href="javascript:;" class="btn btn-small btn-primary delok" data-dismiss="modal">确定</a>
    <a href="javascript:;" class="btn btn-small delcancle" data-dismiss="modal">取消</a>
</div>
<!--Modal footer-->
</div>
    <!--confirm枉 end -->

 <!--弹出窗口alert begain-->
<div id="alertDialog" class="modal hide dialog">
<div class="modal-header">
    <a class="close" data-dismiss="modal">&times;</a>
    <h5 style="color: #555;">提示信息</h5>
</div>
<div class="modal-body" style="text-align: center; padding: 15px; 0 ; font-size: 14px;">
    该部门下还有在职员工，不能被删除
</div>
<div class="modal-footer" style="padding: 8px 0; text-align: center;">
    <a href="javascript:;" class="btn btn-small btn-primary" data-dismiss="modal">确定</a>
</div>
</div>
    <!--弹出窗口alert end-->


<?php $this->script_block_begin(); ?>
    <script type="text/javascript">
         var click_num = 0;
        function do_submit(){
            if(click_num == 0){
                $('#form-horizontal').submit();
            }
            click_num = click_num+1;
        }
        $(document).ready(function() {
            $('#birthday').datepicker();
            $('#datepicker1').datepicker();
            $('#datepicker2').datepicker();
            $('#datepicker3').datepicker();
            $('#datepicker4').datepicker();
            $('#datepicker5').datepicker();
            $('#datepicker6').datepicker();
            $("input[name='jzstarttime[]']").datepicker();
            $("input[name='indue_date']").datepicker();
            $('#datepicker8').datepicker();
            $(".icon-calendar").bind('click',function(e){
                //$('#datepicker').trigger('focus.Datepicker');
                $(this).parent().prev().trigger('click');
                e.stopPropagation();
            });
            //$(".form-horizontal").validate();
            var ajaxUrl = '<?=Util_BaseUrls::ajax_search_user()?>';
            var ajaxUrl2 = '<?=Util_BaseUrls::ajax_search_job()?>';
            var ajaxUnique ='<?=Util_BaseUrls::ajax_search_user()?>';
        });
    </script>

<?php $this->script_block_end(); ?>